//
//  YXClosureWrapper.swift
//  
//
//  Created by tangbl93 on 2021/1/6.
//

import Foundation

/// closure wrapper
public class ClosureWrapper<T>: NSObject, NSCopying {
    public func copy(with zone: NSZone? = nil) -> Any {
        let wrapper: ClosureWrapper = ClosureWrapper()
        wrapper.closure = closure
        return wrapper
    }
    
    var closure: T?
    convenience init(closure: T?) {
        self.init()
        self.closure = closure
    }
}
